﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/SAFS.Master" CodeBehind="Aportes.aspx.vb" Inherits="Template_SAFS_VB.Aportes" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<link rel="stylesheet" href="css/Estilo.css" type="text/css" />
		<!-- include CSS & JS files -->
		<link rel="stylesheet" href="css/colorbox.css" />
        <link href="css/modern.css" rel="stylesheet"/>
		<link href="css/modern-responsive.css" rel="stylesheet"/>
		<link href="css/site.css" rel="stylesheet" type="text/css"/>
        <link rel="stylesheet" type="text/css" href="css/demo.css" />
		<!-- jQuery files -->
		<script type="text/javascript" src="jquery/jquery.js"></script>
		<script type='text/javascript' src='js/jquery.simplemodal.js'></script>
        <script type='text/javascript' src='js/rating.js'></script>
		<script type="text/javascript" src="js/jquery.colorbox.js"></script>
		<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
		<script type="text/javascript" src="js/script.js"></script>
        <script type="text/javascript" src="js/jquery.blockUI.js"></script>
        <script type="text/javascript" src="js/Aportes.js"></script>

        


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<div align="left">

    <input type="hidden" id="currentComent"/>
    <input type="hidden" id="currentType"/>
    <input type="hidden" id="currentId"/>
    <input type="hidden" id="currentIdReturn" />

    <% Response.Write("<input type='hidden' id='session_nombre' value='" & Session("nombre") & " " & Session("ap1") & " " & Session("ap2") & "')/>")%>
    <% Response.Write("<input type='hidden' id='session_rol' value='" & Session("rol") & "/>'")%>
    <% Response.Write("<input type='hidden' id='session_id' value='" & Session("id") & "'/>")%>
    <% Response.Write("<input type='hidden' id='id_tema' value='" & Request("id_tema") & "'/>")%>
    <% Response.Write("<input type='hidden' id='nom_tema' value='" & Request("nom_tema") & "'/>")%>
    <% Response.Write("<input type='hidden' id='session_rol_nom' value='" & Request("nom_rol") & "'/>")%>

        <% Response.Write("<div id='aporte_" & Request("id_tema") & "_ini'>")%>
        <h1><img src="images/back_button.png"  alt="" class="back_button" title="Atras" onclick="history.back()" /><%Response.Write(Request("nom_tema"))%></h1>
        <h3><% Response.Write(consultarTema())%> </h3>
        <% 
            If (consultarEstado()) Then
                Response.Write("<a name='ini' id='" & Request("id_tema") & "' class='inline responder' href='#inline_content'>Responder</a>")
            End If
        %> 
        
        <br /><br/>
    </div>

      
     <% 
         Dim aportes As List(Of Dictionary(Of String, Object)) = getListaAportes()
         Dim comentarios As List(Of Dictionary(Of String, String))
         Dim html As String = ""
     
         For Each aporte As Dictionary(Of String, Object) In aportes
             
             Response.Write(get_HtmlForo(aporte("id"), 0, aporte("usuario"), aporte("rol"), aporte("idusuario"), aporte("fecha"), aporte("comentario"), True, consultarIdPro(), aporte("nota"), consultarCalificacionTema(), consultarEstado()))
             comentarios = CType(aporte("comentarios"), List(Of Dictionary(Of String, String)))
             
             If comentarios.Count > 0 Then
                 
                 For Each comentario As Dictionary(Of String, String) In comentarios
                     
                     Response.Write(get_HtmlForo(comentario("id"), aporte("id"), comentario("usuario"), comentario("rol"), comentario("idUsuario"), comentario("fecha"), comentario("comentario"), False, consultarIdPro(), 0, consultarCalificacionTema(), consultarEstado()))
                     
                Next
                 
             End If
             
         Next
         
         %>
          


<!--Modal form para ingresa el comentario nivel-->
		<div style='display:none'>
			<div id='inline_content' style='padding:10px; background:#fff'>
				<div align="center">
				<strong>Ingrese su mensaje:</strong></br></br>
				<form action="#">
					<textarea class="modalAporte" id="aporte"></textarea>
					<div align="center">
						<input type="submit" value="Enviar" id="ing_coment" name="ING"/>
					</div>
				</form>
				</div>
			</div>
		</div>

        <!--<div style="margin-top: -160px; margin-left: -100px; left: 50%; top:50%; position:absolute;"><img style="width:50px;" src="images/loading.gif" alt=""/></div>-->


</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="server">
</asp:Content>
